package com.yf.service.impl;

import com.yf.domain.Order;
import com.yf.service.OrderService;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/*********************************************************
 **
 ** <br><br>
 ** @author: yangfeng
 ** @date: 2024/4/7 15:10
 ** @version: 1.0.0
 *********************************************************/
@Service
public class OrderServiceImpl implements OrderService {
    @Override
    public List<Order> getList(List<Order> list) {
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime start = now.plusMinutes(5);
        list.stream().filter(t-> t.getCrtTime().isAfter(start) && t.getCrtTime().isBefore(now)).toList();
        return list.stream().filter(t-> t.getCrtTime().isAfter(start) && t.getCrtTime().isBefore(now)).toList();
    }


}
